package o;

public final class fng {
    private static byte[] ˎ = new byte[256];
    private static char[] ॱ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".toCharArray();

    static {
        int i;
        for (i = 0; i < 256; i++) {
            ˎ[i] = (byte) -1;
        }
        for (i = 65; i <= 90; i++) {
            ˎ[i] = (byte) (i - 65);
        }
        for (i = 97; i <= 122; i++) {
            ˎ[i] = (byte) ((i + 26) - 97);
        }
        for (i = 48; i <= 57; i++) {
            ˎ[i] = (byte) ((i + 52) - 48);
        }
        ˎ[43] = (byte) 62;
        ˎ[47] = (byte) 63;
    }

    public static byte[] ˏ(byte[] bArr) {
        byte[] bArr2 = new byte[(((bArr.length + 2) / 3) * 4)];
        int i = 0;
        int i2 = 0;
        while (i2 < bArr.length) {
            Object obj;
            Object obj2;
            int i3 = (bArr[i2] & 255) << 8;
            if (i2 + 1 < bArr.length) {
                i3 |= bArr[i2 + 1] & 255;
                obj = 1;
            } else {
                obj = null;
            }
            i3 <<= 8;
            if (i2 + 2 < bArr.length) {
                i3 |= bArr[i2 + 2] & 255;
                obj2 = 1;
            } else {
                obj2 = null;
            }
            bArr2[i + 3] = (byte) ॱ[obj2 != null ? i3 & 63 : 64];
            int i4 = i3 >> 6;
            int i5 = i + 2;
            char[] cArr = ॱ;
            if (obj != null) {
                i3 = i4 & 63;
            } else {
                i3 = 64;
            }
            bArr2[i5] = (byte) cArr[i3];
            i3 = i4 >> 6;
            bArr2[i + 1] = (byte) ॱ[i3 & 63];
            bArr2[i + 0] = (byte) ॱ[(i3 >> 6) & 63];
            i2 += 3;
            i += 4;
        }
        return bArr2;
    }
}
